import geopandas as gpd
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
pd.set_option('display.max_columns', 500)
Lab 4: Fire Service Coverage Analysis - Maximal Covering Location Problem¶
For this lab we return to Fire Service Coverage seeking to assess tradeoffs in service against costs of maintaining different levels of stations.
Instead of covering all demand, the modeling approach tries to maximize the demand covered.
Specifically, we will employ the maximal covering location problem.
Instead of minimizing the number of facilities needed in a previous lab, we now introduce a parameter, $p$, representing a fixed number of facilities to keep in the system.
In Lab 4, there are three research questions we want to look into.
- Does a change in demand representation impact the optimization results?
- How can a service system be evaluated to prioritize demand maximization?
- Can the analysis process be generalized in order to replicate the approach using different demand representations?
The coverage standard for this lab will be fixed at 8000m.
S = 8000
Step 1. Prepare your dataset¶
Task: Load the three datasets and convert blocks and stations crs into the same one as FDs.crs.¶
- It is because FDs is in a crs using meter as linear unit.
# Note: it might take time, as FD is a huge file.
FDs = gpd.read_file("Data/California_Fire_Districts.shp") # load a shapefile containing California Fire District here
blocks = gpd.read_file("Data/sbBlocks_pop.shp") # Load a shapefile containing Santa Barbara County blocks here
stations = gpd.read_file("Data/Fire_Stations_SBC.shp") # Load a shapefile containing Fire Stations in Santa Barbara County here
FDs
| OBJECTID | County | FDID | MACSID | Name | Address | City | Zip | FireChief | Phone | Notes | LastUpdate | Website | CALFIREUni | SHAPE_Leng | SHAPE_Area | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | ALAMEDA | 01005 | ALA | ALAMEDA FD | 1300 PARK ST | ALAMEDA | 94501 | NICHOLAS LUBY | (510) 337‐2100 | None | 2018-06-21 | https://www.alamedaca.gov/Departments/Fire-Dep... | SCU | 53100.838603 | 6.064225e+07 | POLYGON ((-201596.954 -22267.837, -201603.038 ... |
| 1 | 2 | ALAMEDA | 01008 | ACF | ALAMEDA COUNTY FD | 6363 CLARK AVE | DUBLIN | 94568 | WILLIAM L. MCDONALD | (925) 833‐3473 | None | 2018-06-21 | https://fire.acgov.org/index.page | SCU | 530457.107901 | 1.323031e+09 | MULTIPOLYGON (((-175442.453 -53077.073, -17553... |
| 2 | 3 | ALAMEDA | 01010 | ALB | CITY OF ALBANY FD | 1000 SAN PABLO AVE | ALBANY | 94706 | JAMES BOITO | (510) 528‐5770 | None | 2018-06-21 | https://www.albanyca.org/departments/fire-depa... | SCU | 20088.685628 | 1.370118e+07 | POLYGON ((-201563.420 -10606.685, -201501.465 ... |
| 3 | 4 | ALAMEDA | 01015 | BER | BERKELEY FD | 2100 MLK JR WAY, 2ND FLOOR | BERKELEY | 94704 | DAVID SPRAGUE | (510) 981‐3473 | None | 2018-06-21 | https://www.cityofberkeley.info/fire/ | SCU | 40101.143624 | 4.576781e+07 | POLYGON ((-199372.313 -10022.195, -199339.870 ... |
| 4 | 5 | ALAMEDA | 01040 | FRE | FREMONT FD | 3300 CAPITOL AVE | FREMONT | 94538 | CURTIS JACOBSON | (510) 494‐4200 | None | 2018-06-21 | https://www.fremont.gov/FireDepartment | SCU | 112154.310535 | 2.371594e+08 | POLYGON ((-174294.970 -43700.784, -171936.393 ... |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 740 | 1051 | SAN DIEGO | 37224 | SYC | SYCUAN FD | 5449 SYCUAN RD | EL CAJON | 92019 | ZACHARY CARILLO | (619) 445‐2893 | None | 2023-03-09 | http://www.sycuanfire.com/ | SDU | 37785.328123 | 8.982372e+06 | MULTIPOLYGON (((297409.208 -575061.437, 297410... |
| 741 | 1052 | SAN DIEGO | None | UNSERVED | None | None | None | None | None | None | 2023-03-09 | None | SDU | 45330.418511 | 7.563897e+06 | MULTIPOLYGON (((282015.611 -595689.809, 282087... | |
| 742 | 1053 | SAN DIEGO | 37175 | VCF | VALLEY CENTER FPD | 28234 LILAC ROAD | VALLEY CENTER | 92082 | JOSEF NAPIER | (760) 751‐7600 | None | 2023-03-09 | https://www.valleycenterfire.com/ | SDU | 143517.569373 | 2.105188e+08 | MULTIPOLYGON (((276424.489 -517951.013, 276425... |
| 743 | 1054 | SAN DIEGO | 37235 | VJS | VIEJAS FD | 19854 VIEJAS GRADE ROAD | ALPINE | 91901 | BOB PFOHL | (619) 445‐7772 | None | 2023-03-09 | https://viejasbandofkumeyaay.org/modern-govern... | SDU | 15883.245366 | 6.842021e+06 | POLYGON ((309343.124 -566700.191, 309344.725 -... |
| 744 | 1055 | SAN DIEGO | 37170 | VTA | VISTA FD AND FPD | 200 CIVIC CENTER DR | VISTA | 92084 | NED VANDER POL | (760) 726‐1340 | None | 2023-03-09 | https://www.cityofvista.com/departments/fire-d... | SDU | 72732.586859 | 9.194203e+07 | POLYGON ((262798.704 -523482.702, 262810.008 -... |
745 rows × 17 columns
Task: Look into the following Fire District maps.¶
There are many Fire Districts in California.
We are only going to focus in the "Santa Barbara County Fire District".
In the second map, note that there are many other Fire Districts in Santa Barbara County.
Though it's not shown on the map, they have some overlapping area, which means the area is co-operated by multiple Fire Districts.
blocks = blocks.to_crs(FDs.crs)
FDs.plot("Name")
<Axes: >
FDs = FDs.loc[FDs.intersects(blocks.unary_union)].reset_index(drop=True)
FDs.plot("Name", legend=True, figsize=(10,10))
<Axes: >
FDs
| OBJECTID | County | FDID | MACSID | Name | Address | City | Zip | FireChief | Phone | Notes | LastUpdate | Website | CALFIREUni | SHAPE_Leng | SHAPE_Area | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 89 | KERN | 15010 | KRN | KERN CO FD | 5642 VICTOR ST | BAKERSFIELD | 93308 | AARON DUNCAN | (661) 391‐7000 | None | 2018-06-21 | https://kerncountyfire.org/ | KRN | 998841.649563 | 1.921083e+10 | MULTIPOLYGON (((207559.325 -315382.144, 207622... |
| 1 | 304 | SAN LUIS OBISPO | 40080 | SLC | SAN LUIS OBISPO CO FD | 635 N SANTA ROSA ST | SAN LUIS OBISPO | 93405 | JOHN OWENS | (805) 543‐4244 | None | 2018-06-21 | https://calfireslo.org/ | SLU | 940256.942591 | 8.344077e+09 | MULTIPOLYGON (((-58528.672 -319737.906, -58473... |
| 2 | 316 | SANTA BARBARA | 42005 | CRP | CARPINTERIA SUMMERLAND FPD | 1140 EUGENE PLACE, SUITE A | CARPINTERIA | 93013 | GREG FISH | (805) 684‐4591 | None | 2018-06-21 | https://www.carpfire.com/ | SBC | 49534.138992 | 1.010901e+08 | POLYGON ((50973.663 -398386.099, 50969.942 -39... |
| 3 | 317 | SANTA BARBARA | 42030 | MTO | MONTECITO FPD | 595 SAN YSIDRO RD | SANTA BARBARA | 93108 | KEVIN TAYLOR | (805) 969‐7762 | None | 2018-06-21 | https://www.montecitofire.com/ | SBC | 39911.074682 | 3.644463e+07 | POLYGON ((35557.315 -399389.055, 35295.841 -39... |
| 4 | 318 | SANTA BARBARA | 42035 | SBC | SANTA BARBARA CFD | 4410 CATHEDRAL OAKS RD | SANTA BARBARA | 93110 | MARK A. HARTWIG | (805) 681‐5500 | None | 2018-06-21 | https://www.sbcfire.com/ | SBC | 778360.396807 | 3.666998e+09 | MULTIPOLYGON (((23728.804 -401033.857, 23715.3... |
| 5 | 396 | VENTURA | 56020 | VNC | VENTURA COUNTY FPD | 165 DURLEY AVE | CAMARILLO | 93010 | DUSTIN GARDNER | (805) 389‐9710 | None | 2018-06-21 | https://vcfd.org/ | VNC | 840086.616548 | 4.239353e+09 | MULTIPOLYGON (((72888.961 -429800.719, 72849.7... |
| 6 | 647 | SANTA BARBARA | 42010 | GUA | GUADALUPE FD | 918 OBISPO ST | GUADALUPE | 93434 | MICHAEL CASH | (805) 356‐3905 | None | 2022-02-10 | https://ci.guadalupe.ca.us/fire/ | SBC | 14598.470583 | 3.446183e+06 | POLYGON ((-52159.523 -337901.424, -52142.953 -... |
| 7 | 662 | SANTA BARBARA | 42040 | SMR | SANTA MARIA FD | 314 WEST COOK ST #8 | SANTA MARIA | 93458 | TODD TUGGLE | (805) 925‐0951 | None | 2022-02-14 | https://www.cityofsantamaria.org/city-governme... | SBC | 71542.884890 | 6.075262e+07 | MULTIPOLYGON (((-36710.959 -344913.125, -36707... |
| 8 | 676 | SANTA BARBARA | 42025 | STB | SANTA BARBARA CITY FD | 925 CHAPALA ST | SANTA BARBARA | 93101 | CHRIS MAILES | (805) 965‐5254 | None | 2022-02-14 | https://www.santabarbaraca.gov/gov/depts/fire/... | SBC | 81431.348424 | 5.056587e+07 | MULTIPOLYGON (((15469.272 -397501.519, 15472.5... |
| 9 | 678 | SANTA BARBARA | 42015 | LMP | LOMPOC FD | 115 SOUTH G ST | LOMPOC | 93436 | BRIAN FALLON | (805) 736‐4513 | None | 2022-02-14 | https://www.cityoflompoc.com/government/depart... | SBC | 38950.291184 | 3.025921e+07 | MULTIPOLYGON (((-42597.382 -377627.460, -42626... |
Question 1: Sort out a Fire District out of FDs GeoDataFrame. The district must have its 'Name" column value, "SANTA BARBARA CFD". ( 1 pt )¶
SBC_FD = FDs[FDs['Name'] == "SANTA BARBARA CFD"].reset_index(drop=True)
SBC_FD
| OBJECTID | County | FDID | MACSID | Name | Address | City | Zip | FireChief | Phone | Notes | LastUpdate | Website | CALFIREUni | SHAPE_Leng | SHAPE_Area | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 318 | SANTA BARBARA | 42035 | SBC | SANTA BARBARA CFD | 4410 CATHEDRAL OAKS RD | SANTA BARBARA | 93110 | MARK A. HARTWIG | (805) 681‐5500 | None | 2018-06-21 | https://www.sbcfire.com/ | SBC | 778360.396807 | 3.666998e+09 | MULTIPOLYGON (((23728.804 -401033.857, 23715.3... |
Task: Run following cell, "del FDs". Note: It will delete FDs variable.¶
We do this because FDs contains a large shapefile, which might burden your RAM.
del FDs
Task: take a subset of stations, within SBC_FD.¶
NOTE: don't forget to RESET_INDEX() whenever you take a subset!
stations = stations.to_crs(blocks.crs)
stations = stations.loc[stations.within(SBC_FD.unary_union)].reset_index(drop=True)
len(stations)
28
Question 2: Plot the blocks GeoDataFrame. ( 2 pts )¶
- Firstly, update the blocks GeoDataFrame's geometry column to have block centroids, not block polygons ( 0.5 pt )
- Secondly, take a subset of blocks which is within the SBC_FD area ( 0.5 pt )
- Thirdly, plot blocks GeoDataFrame with "Population" column. ( 1 pt )
- figsize=(10,10)
- opacity must be 0.4
- take a cmap (colormap) that you like from this webpage (https://matplotlib.org/stable/users/explain/colors/colormaps.html).
- markersize must be proportional to the column, "Population"
- ensure you have legend
- Plot with stations GeoDataFrame
Hint: when there's something you don't know about plot function, refer to this document page (https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.plot.html)! Also, you can Google or ask chatGPT :)
blocks['geometry'] = blocks['geometry'].centroid
blocks = blocks.loc[blocks.within(SBC_FD.unary_union)].reset_index(drop=True)
fig, ax = plt.subplots(figsize=(10, 10))
SBC_FD.plot(ax=ax, color='none', edgecolor='blue', zorder=10)
blocks.plot(
ax=ax,
column='Population',
cmap='viridis',
legend=True,
markersize=blocks['Population']*0.1,
alpha=0.4,
legend_kwds={'label':"Population"}
)
stations.plot(ax=ax, color='red', markersize=50, label='Stations', zorder=5)
plt.title("population of blocks")
plt.show
<function matplotlib.pyplot.show(close=None, block=None)>
len(blocks)
3224
Step 2. Conduct MCLP¶
Decision Variables: \begin{align*} & x_j = \begin{cases} 1, & \text{if facility $j$ is open}, \\ 0, & \text{otherwise}. \end{cases} \\ & y_i = \begin{cases} 1, & \text{if demand $i$ is covered}, \\ 0, & \text{otherwise}. \end{cases} \end{align*}
Parameters: \begin{align*} & I = \text{number of demands}, \\ & J = \text{number of facilities}, \\ & S = \text{Coverage Distance Standard}, \\ & a_i = \text{Weight assigned to demand $i$}, \\ & D_{ij} = \text{Distance between demand $i$ and facility $j$}, \\ & N_i = \{ j \in J \, | \, D_{ij} \leq S \}, \\ & P = \text{the number of facilities to be opened}. \end{align*}
Objective Function: \begin{align*} \text{Maximize:} \quad & \sum_{i=1}^{I} a_i y_i \end{align*}
Constraints: \begin{align*} \text{Subject to:} \quad & \sum_{j \in N_i} x_j \geq y_i, \quad \forall i \in I \\ & \sum_{j=1}^{J} x_j \leq P, \\ & x_j, y_i \in \{0, 1\}, \quad \forall i, j. \end{align*}
Task: Based on the mathematical Model, set the I and J values correctly.¶
- In this section, we will consider each block as demand $i$
- we will consider each existing fire station as facility $j$
- In the beginning of this lab, we defined our S value to be 8000 meter, 8 km.
- Pick any P that is less than current number of stations :)
I = len(blocks)
J = len(stations)
P = 20
Task: We are going to have block's population as weight assigned to demand. Define $a_i$.¶
a_i = blocks['Population']
Task: Create $D_{ij}$ variable using Euclidean Distance between demand $i$ and facility $j$.¶
D_ij =[[np.sqrt((blocks['geometry'].x[i] - stations.geometry.x[j])**2 + (blocks['geometry'].y[i] - stations.geometry.y[j])**2)
for j in range(J)] for i in range(I)]
Question 3: Create $N_i$ variable in list format. ( 1 pt )¶
- Previously, $N_i$ in dictionary is introduced.
- With your understanding so far, list format of $N_i$ can also be created.
- You can use double for-loops, or list comprehension.
# This is a hint for students who want to do it with list comprehension
# Creating a two-dimensional list
matrix = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12]]
# Using list comprehension to filter even numbers from the matrix
# The '%' symbol in Python is called the modulo operator.
#It returns the remainder of the division of the left operand by the right operand.
even_numbers = [[matrix[r][c] for c in range(len(matrix[0])) if matrix[r][c]%2 == 0]
for r in range(len(matrix))]
print(even_numbers)
[[2], [4, 6], [8], [10, 12]]
N_i = [[j for j in range(J) if D_ij[i][j] <= S] for i in range(I)]
N_i
[[18], [], [], [15, 16], [], [], [0, 1, 18], [], [5, 6, 7, 26], [0, 1, 18], [0, 1, 18], [15, 16], [0, 1, 18, 27], [0, 1, 18, 27], [0, 1, 18], [0, 1, 18], [0, 1, 18, 27], [0, 1, 18], [0, 1, 18], [0, 1, 17, 18, 27], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 17, 18, 27], [0, 1, 18], [0, 1, 18], [0, 1, 17, 18, 27], [0, 1, 17, 18, 27], [0, 1, 18, 27], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [13, 15], [13, 15], [13, 15], [13], [13], [13], [13, 15], [13], [13], [13], [], [], [], [], [], [], [4, 5, 26], [], [], [], [], [], [], [], [], [], [], [], [23], [23], [23], [23], [23], [23], [], [23], [], [], [], [25], [], [], [], [], [], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 21, 24], [8, 9, 10, 19, 24], [1, 17, 27], [1, 17, 27], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [20, 21, 22, 24], [19, 20, 21, 22, 24], [15, 16], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [8, 9, 10, 19, 20, 21, 24], [8, 9, 10, 19, 21, 24], [8, 9, 10, 19, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [], [], [4], [0, 1], [0, 1, 18], [0, 1], [0, 1], [0, 1], [0, 1, 3], [11], [2], [11], [13, 15, 16], [17, 27], [23], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [13], [4, 5], [4, 5], [4, 5], [19, 20, 21, 22, 24], [8, 9, 10, 19, 24], [8, 9, 19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [8, 9, 10], [8, 9, 10], [8, 9, 10], [8, 9, 10], [8, 9, 10], [8, 9, 10], [0, 1, 18], [0, 1, 18], [15, 16], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [15, 16], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [], [15, 16], [1, 17, 27], [19, 20, 21, 22, 24], [15, 16], [19, 20, 21, 22, 24], [18], [16], [16, 18], [18], [18], [18], [18], [18], [18], [18], [15, 16], [18], [4, 5], [0, 1, 18], [18], [1, 18], [18], [0, 18], [0, 1, 18], [18], [18], [4, 5], [0, 1, 18], [0, 1, 18], [4, 5, 6, 7, 26], [4], [4, 5, 26], [4, 5], [4, 5, 6, 7, 26], [4, 5], [4, 5, 26], [4], [4, 5], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5], [4, 5], [4, 5, 6, 7, 26], [15, 16], [15, 16], [20, 21, 22, 24], [25], [25], [25], [25], [25], [], [0, 1, 18], [0, 1, 18], [], [0, 1, 18], [0, 1, 18], [26], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [20, 21, 22], [0, 1, 18], [20, 21, 22, 24], [0, 1, 18], [0, 1, 18], [0, 1, 18], [20, 21, 22, 24], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 17, 27], [0, 1, 18], [0, 1, 17, 27], [0, 1, 17, 27], [0, 1, 17, 27], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [0, 1, 17, 27], [0, 1, 17, 27], [0, 1, 17, 27], [0, 1, 18], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [0, 1, 18], [0, 1, 17, 27], [0, 1, 17, 27], [0, 1, 18], [18], [], [], [11], [], [], [], [11], [23], [5], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [17, 27], [17, 27], [4, 5], [4, 5], [0, 1, 18], [0, 1, 18], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [15, 16], [14], [4, 5, 6, 7, 26], [15, 16], [9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [15, 16], [1, 2, 3], [15, 16], [4, 5], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [15, 16], [0, 1, 17, 27], [15, 16], [], [8, 9, 10, 19, 24], [], [0, 1, 18], [15, 16], [15, 16], [5, 6, 7, 26], [], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [15, 16], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [8, 9, 19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [15, 16], [15, 16], [15, 16], [19, 20, 21, 22, 24], [15, 16], [19, 20, 21, 22, 24], [15, 16], [15, 16], [15, 16], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 21, 24], [8, 9, 10, 19, 21, 24], [8, 9, 10], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [25], [25], [25], [25], [25], [25], [25], [5, 23], [5], [5, 23], [23], [23], [23], [23], [23], [4, 5, 6, 7, 26], [4, 5], [], [8, 9, 10], [], [], [], [8, 9, 10], [], [19, 20, 21, 22, 24], [17, 27], [], [15, 16], [19, 20, 21, 22, 24], [15, 16], [15, 16], [15, 16], [15, 16], [0, 1, 18], [15, 16], [0, 1, 18, 27], [0, 1, 18, 27], [0, 1, 18, 27], [0, 1, 18], [0, 1, 18, 27], [0, 1, 18], [0, 1, 18], [0, 1, 18], [8, 9, 10, 19], [0, 1, 18, 27], [0, 1, 18, 27], [0, 1, 18], [], [4, 5], [19, 20, 21, 22, 24], [15, 16], [0, 1, 18], [17, 27], [17, 27], [4, 5], [15, 16], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [0, 1, 17, 27], [0, 1, 17, 27], [17, 27], [17, 27], [5, 6, 7, 26], [15, 16], [1, 17, 27], [1, 17, 27], [15, 16], [15, 16], [1, 17, 27], [0, 1, 18], [8, 9, 10, 19, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [6, 7], [6, 7, 26], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [6, 7, 25], [15, 16], [25], [4, 5], [], [], [25], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [1, 17, 27], [1, 17, 27], [1, 17, 27], [1, 17, 27], [19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [0, 1, 18], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [13, 15, 16], [1, 17, 27], [0, 1, 17, 27], [18], [17, 27], [15, 16], [15, 16], [26], [1, 17, 27], [15, 16], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [0, 1, 3], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [14], [17, 27], [17, 27], [17, 27], [17, 27], [5, 6, 7, 26], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [8, 9, 19, 20, 21, 22, 24], [5], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [13, 15, 16], [19, 20, 21, 22, 24], [8, 9, 10, 19, 21, 24], [19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10], [4, 5, 6, 7, 26], [8, 9, 19, 20, 21, 22, 24], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [17, 27], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [5, 6, 7, 26], [15, 16], [15, 16], [0, 1, 18], [15, 16], [15, 16], [9, 19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [4, 5], [4, 5], [4, 5], [4, 5], [14], [], [], [], [14], [], [], [14], [], [], [14], [], [], [], [], [], [26], [], [2, 3], [13, 15, 16], [6, 7, 26], [2, 3], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [15, 16], [], [], [], [], [], [], [], [], [], [], [], [], [], [11], [], [], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [5, 6, 7, 26], [4, 5, 6, 7, 26], [8, 9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [15, 16], [16], [], [19, 20, 21, 22, 24], [15, 16], [9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [0, 18], [19, 20, 21, 22, 24], [26], [14], [14], [18], [15, 16], [15, 16], [8, 9, 19, 20, 21, 22, 24], [15, 16], [], [8, 9, 10, 19, 20, 21, 24], [], [8, 9, 19, 20, 21, 22, 24], [14], [1, 17, 27], [9, 19, 20, 21, 22, 24], [4], [1, 17, 27], [8, 9, 10, 19, 20, 21, 22, 24], [23], [15, 16], [15, 16], [], [8, 9, 10, 19], [15, 16], [15, 16], [15, 16], [19, 20, 21, 22, 24], [15, 16], [], [], [], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [15, 16], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [5, 6, 7, 26], [20, 21, 22, 24], [20, 21, 22, 24], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [17, 27], [20, 21, 22, 24], [20, 21, 22, 24], [20, 21, 22, 24], [20, 21, 22, 24], [5, 6, 7, 26], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [8, 9, 19, 20, 21, 22, 24], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [0, 1, 18], [15, 16], [0, 1, 17, 27], [0, 1, 18], [0, 1, 18], [], [0, 1, 18], [15, 16], [0, 1, 18], [18], [18], [17, 27], [4], [4, 5], [], [], [], [25], [25], [25], [8, 9, 19, 20, 21, 22, 24], [25], [25], [25], [25], [25], [25], [25], [15], [25], [20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [], [0, 1], [0, 1], [0, 1], [0, 1, 3], [19, 20, 21, 22, 24], [0, 1], [0, 1], [0, 1, 3], [0, 1, 3], [11], [11], [11], [11], [11], [11], [11], [4, 5], [5, 26], [4, 5, 26], [5], [4, 5, 23], [23], [5], [4, 5, 6, 7, 26], [5, 23], [4, 5], [4, 5], [4, 5], [5, 26], [5, 6, 7, 26], [6, 7, 25, 26], [5, 6, 7, 26], [6, 7, 26], [6, 7, 25, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [14], [4, 5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [6, 7, 26], [5, 6, 7, 26], [6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [4, 5, 6, 7, 26], [5, 6, 7, 26], [5, 6, 7, 26], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [15, 16], [4, 5, 6, 7, 26], [4, 5, 6, 7, 26], [8, 9, 10, 19], [8, 9, 10, 19], [8, 9, 10, 19, 24], [20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [4, 5, 6, 7, 26], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19], [9, 19, 20, 21, 22, 24], [5, 6, 7, 26], [4, 5], [17, 27], [19, 20, 21, 22, 24], [4, 5], [8, 9, 10], [8, 9, 10, 19, 20, 21, 24], [8, 9, 10, 19], [8, 9, 10, 19, 24], [], [19, 20, 21, 22, 24], [], [13], [8, 9, 19, 20, 21, 22, 24], [9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [4, 5, 6, 7, 26], [], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], [8, 9, 10, 19], [19, 20, 21, 22, 24], [15, 16], [15, 16], [16], [8, 9, 10, 19], [19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [15, 16], [15, 16], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 24], [], [17, 27], [15, 16], [15, 16], [15, 16], [15, 16], [0, 1, 17, 27], [8, 9, 10, 19, 24], [8, 9, 10, 19, 24], [8, 9, 10, 19, 24], [15, 16], [18], [14], [8, 9, 19, 20, 21, 22, 24], [], [15, 16], [], [15, 16], [], [], [14], [17, 27], [14], [14], [15, 16], [15, 16], [15, 16], [13, 15, 16], [8, 9, 10, 19, 20, 21, 24], [8, 9, 10, 19, 21, 24], [8, 9, 10, 19, 20, 21, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 24], [], [8, 9, 10, 19, 20, 21, 24], [], [8, 9, 19, 20, 21, 22, 24], [4, 5, 6, 7, 26], [8, 9, 10, 19, 20, 21, 24], [8, 9, 10, 19], [8, 9, 10, 19, 20, 21, 24], [8, 9, 10, 19, 21, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 19, 20, 21, 22, 24], [8, 9, 10, 19, 20, 21, 22, 24], ...]
Question 4: Complete the Optimization Model ( 6 pts )¶
import gurobipy as gp
from gurobipy import GRB
# Create a new Gurobi model
mclp = gp.Model("Maximal_Covering_Location")
# Decision Variables
x = mclp.addVars(J, vtype=GRB.BINARY, name="x") # Facility is open or not
y = mclp.addVars(I, vtype=GRB.BINARY, name="y") # Demand is covered or not
# Objective Function
mclp.setObjective(gp.quicksum(a_i[i]*y[i] for i in range(I)), GRB.MAXIMIZE)
# Constraints
# Each demand must be covered by neighboring facility
mclp.addConstrs(gp.quicksum(x[j] for j in N_i[i]) >= y[i] for i in range (I))
# Number of opened facilities must not exceed P
mclp.addConstr(gp.quicksum(x[j] for j in range(J)) <= P)
# Optimize the model
mclp.optimize()
Set parameter Username Academic license - for non-commercial use only - expires 2025-05-10 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x06e3d55a Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.01s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
Question 5: Take a subset of stations based on the model output. ( 1 pt )¶
open_stations_indices = [j for j in range(J) if x[j].x > 0.5]
open_stations= stations.iloc[open_stations_indices]
open_stations
| Label | Desig | Number | Type | Department | Name_other | Address | Notes | Num_2019 | Scale | Latitude | Longitude | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | VAFB-42 | AFV-2 | 42 | Fire Station | Vandenberg Fire Department | None | New Mexico Ave., Vandenberg, CA | None | 42 | 0 | 34.7345 | -120.534 | POINT (-48865.923 -364526.814) |
| 2 | VAFB-44 | AFV-4 | 44 | Fire Station | Vandenberg Fire Department | None | Arguello Rd., Vandenberg, CA | None | 44 | 0 | 34.6125 | -120.570 | POINT (-52227.109 -378048.804) |
| 4 | SBC-31 | SBC-31 | 31 | Fire Station | Santa Barbara County Fire Department | None | 168 W Hwy 246, Buellton, CA 93427 | None | 31 | 900 | 34.6132 | -120.197 | POINT (-18043.064 -378107.359) |
| 5 | SBC-30 | SBC-30 | 30 | Fire Station | Santa Barbara County Fire Department | None | 1644 Oak St., Solvang, CA 93464 | None | 30 | 900 | 34.5935 | -120.142 | POINT (-12980.623 -380307.178) |
| 6 | SBC-32 | SBC-32 | 32 | Fire Station | Santa Barbara County Fire Department | None | 906 Airport Rd., Santa Ynez, CA 93460 | None | 32 | 1100 | 34.6075 | -120.069 | POINT (-6364.715 -378763.420) |
| 9 | SBC-13 | SBC-13 | 13 | Fire Station | Santa Barbara County Fire Department | None | 4570 Hollister, Santa Barbara, CA 93110 | None | 13 | 1000 | 34.4386 | -119.780 | POINT (20241.872 -397479.331) |
| 11 | SBC-27 | SBC-27 | 27 | Fire Station | Santa Barbara County Fire Department | None | 41 Newsome St., New Cuyama, CA 93254 | None | 27 | 700 | 34.9457 | -119.682 | POINT (29023.176 -341164.220) |
| 12 | LPF-35 | LPF-35 | 35 | Fire Station | LPF | Pine Canyon | 8145 Hwy 166, Santa Maria, CA 93454 | None | 35 | 0 | 35.0294 | -120.194 | POINT (-17696.745 -331903.082) |
| 13 | SBC-23 | SBC-23 | 23 | Fire Station | Santa Barbara County Fire Department | None | 5003 Depot Ave., Santa Maria, CA 93454 | None | 23 | 600 | 34.8666 | -120.294 | POINT (-26898.330 -349956.970) |
| 14 | SBC-24 | SBC-24 | 24 | Fire Station | Santa Barbara County Fire Department | None | 99 Centennial, Los Alamos, CA 93440 | None | 24 | 800 | 34.7451 | -120.280 | POINT (-25603.519 -363453.395) |
| 15 | SBC-26 | SBC-26 | 26 | Fire Station | Santa Barbara County Fire Department | None | 1600 Tiffany Park Court, Santa Maria, CA 93455 | None | 26 | 600 | 34.8657 | -120.402 | POINT (-36721.414 -350025.728) |
| 16 | SBC-21 | SBC-21 | 21 | Fire Station | Santa Barbara County Fire Department | None | 335 Union Ave., Orcutt, CA 93455 | None | 21 | 600 | 34.8644 | -120.444 | POINT (-40540.132 -350149.951) |
| 17 | SBC-34 | SBC-34 | 34 | Fire Station | Santa Barbara County Fire Department | None | 3510 Harris Grade Rd., Lompoc, CA 93436 | None | 34 | 1000 | 34.6909 | -120.447 | POINT (-40958.522 -369401.362) |
| 18 | VAFB-43 | AFV-3 | 43 | Fire Station | Vandenberg Fire Department | None | El Rancho Rd., Vandenberg, CA | None | 43 | 0 | 34.7882 | -120.565 | POINT (-51640.364 -358544.456) |
| 19 | SBC-12 | SBC-12 | 12 | Fire Station | Santa Barbara County Fire Department | None | 5330 Calle Real, Goleta, CA 93117 | None | 12 | 900 | 34.4429 | -119.812 | POINT (17256.190 -397008.608) |
| 22 | SBC-11 | SBC-11 | 11 | Fire Station | Santa Barbara County Fire Department | None | 6901 Frey Way, Goleta, CA 93117 | None | 11 | 700 | 34.4258 | -119.870 | POINT (11934.816 -398917.392) |
| 23 | SBC-38 | SBC-38 | 38 | Fire Station | Santa Barbara County Fire Department | None | 17200 Mariposa Reina, Gaviota, CA 93117 | None | 38 | 800 | 34.4767 | -120.214 | POINT (-19690.488 -393256.876) |
| 25 | SBC Camp 1 | SBC-CR | None | Camp | Santa Barbara County Fire Department | Cachuma Camp | Lakeview Dr., Lake Cachuma, CA | Crew 10, Crew 11 | CREW | 1200 | 34.5688 | -119.948 | POINT (4737.414 -383052.783) |
| 26 | CHU-1 | CHU-1 | 1 | Fire Station | Chumash Fire Department | Chumash | 3300 Hwy 246, Santa Ynez, CA 93460 | None | 1 | 0 | 34.6088 | -120.089 | POINT (-8141.257 -378616.310) |
Question 6: Plot the open_stations and their coverage buffers with the demand buffers. ( 2 pts )¶
- Copy and Paste the plotting code from Question 2.
- Replace stations with open_stations.
- Add another plot function which plots the buffer with buffer distance S from each open_station.
- The coverage buffer shouldn't have facecolor
- Buffer Boundary must be dashed lines. (ask chatGPT of google how to do this!)
open_stations['buffer'] = open_stations.geometry.buffer(S)
fig, ax = plt.subplots(figsize=(10, 10))
SBC_FD.plot(ax=ax, color='none', edgecolor='blue', zorder=10)
blocks.plot(
ax=ax,
column='Population',
cmap='viridis',
legend=True,
markersize=blocks['Population']*0.1,
alpha=0.4,
legend_kwds={'label':"Population"}
)
open_stations.plot(ax=ax, color='red', markersize=50, label='Stations', zorder=5)
for buffer in open_stations['buffer']:
gpd.GeoSeries(buffer).boundary.plot(ax=ax, linestyle='--', color='green')
plt.title("population of blocks")
plt.show
/opt/anaconda3/lib/python3.11/site-packages/geopandas/geodataframe.py:1525: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy super().__setitem__(key, value)
<function matplotlib.pyplot.show(close=None, block=None)>
Step 3. Functionize / Modularize¶
Here, we will functionize our optimization model.
Sothat with given P value, the model can be solved.
Question 7: Functionize your code out of Question 4 and 5 ( 2 pts )¶
- start defining a function named, "solve_mclp". ( 0.5 pts )
- The function takes one argument, P. ( 0.5 pts )
- Within the function, copy and paste the code you did for Question 4 and 5. ( 0.5 pts )
- Then, add the last line of code, to return open_stations, and mclp.obj_val ( 0.5 pts )
# Let me give you functionize example.
# For more, refer to Lab 0.
sample_list = [1,2,3,4]
def sum_array(a):
s = 0
a = np.array(a)
for num in a:
s += num
return s, a # Return the summation of all elements, and the original array
sum_array(sample_list)
(10, array([1, 2, 3, 4]))
## PUT YOUR FUNCTION HERE!!!##
def solve_mclp(P):
mclp = gp.Model("Maximal_Covering_Location")
x = mclp.addVars(J, vtype=GRB.BINARY, name="x")
y = mclp.addVars(I, vtype=GRB.BINARY, name="y")
mclp.setObjective(gp.quicksum(a_i[i]*y[i] for i in range(I)), GRB.MAXIMIZE)
mclp.addConstrs(gp.quicksum(x[j] for j in N_i[i]) >= y[i] for i in range (I))
mclp.addConstr(gp.quicksum(x[j] for j in range(J)) <= P)
mclp.optimize()
open_stations_indices = [j for j in range(J) if x[j].x > 0.5]
open_stations= stations.iloc[open_stations_indices]
return open_stations, mclp.obj_val
Step 4. Evaluate the Result¶
Question 8: To evaluate the optimization result, we always compare with the current operation. Calculate current_coverage. ( 2 pts )¶
Current coverage is the sum of all the demand weights, currently covered by existing stations.
Here are the thought process you can go through.
- Create buffers with distance S out of all the existing stations.
- Take a unary_union of the buffers. ( 0.5 pts )
- Use .within() function to take a subset of blocks, within the unary_union of coverage buffers. ( 0.5 pts )
- Take the Population column out of the subset of blocks. ( 0.5 pts )
- Take the sum of the column values. ( 0.5 pts )
stations['buffer'] = stations.geometry.buffer(S)
buffer_union = stations['buffer'].unary_union
covered_blocks = blocks[blocks.geometry.within(buffer_union)]
covered_population = covered_blocks['Population']
current_coverage = covered_population.sum()
Task: Check if provided code works with your defined function, solve_mclp¶
selecteds = [] # List to store selected stations for each value of p
obj_vals = [] # List to store objective values for each value of p
# Iterate over values of p starting from 3
for p in range(3, len(stations)+1):
print(f"=================== for P={p}") # Print current value of p
# Call solve_mclp function to solve the problem for current value of p
selected_stations, obj_val = solve_mclp(p)
# Append selected stations to the selecteds list
selecteds.append(selected_stations)
# Append objective value to the obj_vals list
obj_vals.append(obj_val)
=================== for P=3
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xc1148ef3
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [3e+00, 3e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 28463.000000
Root relaxation: objective 1.420460e+05, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 142046.00000 142046.000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 142046 28463 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.420460000000e+05, best bound 1.420460000000e+05, gap 0.0000%
=================== for P=4
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xd9224489
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [4e+00, 4e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 35944.000000
Root relaxation: objective 1.535990e+05, 20 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 153599.00000 153599.000 0.00% - 0s
Explored 1 nodes (20 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 153599 35944 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.535990000000e+05, best bound 1.535990000000e+05, gap 0.0000%
=================== for P=5
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x1e8621a4
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [5e+00, 5e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 101213.00000
Root relaxation: objective 1.578710e+05, 19 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 157871.00000 157871.000 0.00% - 0s
Explored 1 nodes (19 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 157871 101213 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.578710000000e+05, best bound 1.578710000000e+05, gap 0.0000%
=================== for P=6
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x4872ed6f
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [6e+00, 6e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 103347.00000
Root relaxation: objective 1.615640e+05, 16 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 161564.00000 161564.000 0.00% - 0s
Explored 1 nodes (16 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 161564 103347 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.615640000000e+05, best bound 1.615640000000e+05, gap 0.0000%
=================== for P=7
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x50c869a2
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [7e+00, 7e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 138503.00000
Root relaxation: objective 1.636980e+05, 14 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 163698.00000 163698.000 0.00% - 0s
Explored 1 nodes (14 simplex iterations) in 0.03 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 163698 138503 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.636980000000e+05, best bound 1.636980000000e+05, gap 0.0000%
=================== for P=8
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xc631c009
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [8e+00, 8e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 139069.00000
Root relaxation: objective 1.656950e+05, 11 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 165695.00000 165695.000 0.00% - 0s
Explored 1 nodes (11 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 165695 139069 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.656950000000e+05, best bound 1.656950000000e+05, gap 0.0000%
=================== for P=9
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xde1bae41
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [9e+00, 9e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 139439.00000
Root relaxation: objective 1.663330e+05, 11 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 166333.00000 166333.000 0.00% - 0s
Explored 1 nodes (11 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 166333 139439 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.663330000000e+05, best bound 1.663330000000e+05, gap 0.0000%
=================== for P=10
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xda05e924
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 139558.00000
Root relaxation: objective 1.668990e+05, 6 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 166899.00000 166899.000 0.00% - 0s
Explored 1 nodes (6 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 166899 139558 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.668990000000e+05, best bound 1.668990000000e+05, gap 0.0000%
=================== for P=11
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x4f3e9f77
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 140196.00000
Root relaxation: objective 1.671390e+05, 6 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167139.00000 167139.000 0.00% - 0s
Explored 1 nodes (6 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167139 140196 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.671390000000e+05, best bound 1.671390000000e+05, gap 0.0000%
=================== for P=12
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x1e3b83ba
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 140425.00000
Root relaxation: objective 1.673330e+05, 3 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167333.00000 167333.000 0.00% - 0s
Explored 1 nodes (3 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167333 140425 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.673330000000e+05, best bound 1.673330000000e+05, gap 0.0000%
=================== for P=13
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x209b8da2
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 167360.00000
Root relaxation: objective 1.674520e+05, 2 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167452.00000 167452.000 0.00% - 0s
Explored 1 nodes (2 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167452 167360 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.674520000000e+05, best bound 1.674520000000e+05, gap 0.0000%
=================== for P=14
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x03cf73b5
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 167374.00000
Root relaxation: objective 1.675220e+05, 2 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167522.00000 167522.000 0.00% - 0s
Explored 1 nodes (2 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167522 167374 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.675220000000e+05, best bound 1.675220000000e+05, gap 0.0000%
=================== for P=15
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x952e5b76
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 167443.00000
Root relaxation: objective 1.675910e+05, 1 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167591.00000 167591.000 0.00% - 0s
Explored 1 nodes (1 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167591 167443 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.675910000000e+05, best bound 1.675910000000e+05, gap 0.0000%
=================== for P=16
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xcd3e3dcd
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 167605.00000
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 2: 167605 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676050000000e+05, best bound 1.676050000000e+05, gap 0.0000%
=================== for P=17
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x0e5accf5
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3203 rows and 3211 columns
Presolve time: 0.00s
Presolved: 22 rows, 41 columns, 90 nonzeros
Found heuristic solution: objective 167606.00000
Variable types: 0 continuous, 41 integer (41 binary)
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=18
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xbd53d068
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3210 rows and 3218 columns
Presolve time: 0.00s
Presolved: 15 rows, 34 columns, 62 nonzeros
Found heuristic solution: objective 167606.00000
Variable types: 0 continuous, 34 integer (34 binary)
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=19
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x4d9615ea
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=20
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x06e3d55a
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=21
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xac9379a7
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=22
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x294b1219
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=23
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x9b75ffee
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=24
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x4030e886
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=25
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x80c372e9
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=26
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xba252813
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [3e+01, 3e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=27
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xb06b9a49
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [3e+01, 3e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=28
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xe144439c
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [3e+01, 3e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3225 rows and 3252 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 1 (of 8 available processors)
Solution count 2: 167606 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
Task: Check if the output Table is plausible. And learn how to create a pandas DataFrame¶
- To create a DataFrame, you can call pandas.DataFrame() and deliver a dictionary.
- The dictionary will have key and value pairs.
- key will be the column name
- value will be an array of column values
results = pd.DataFrame({
'P': range(3, len(stations)+1),
'Coverage': obj_vals
})
results
| P | Coverage | |
|---|---|---|
| 0 | 3 | 142046.0 |
| 1 | 4 | 153599.0 |
| 2 | 5 | 157871.0 |
| 3 | 6 | 161564.0 |
| 4 | 7 | 163698.0 |
| 5 | 8 | 165695.0 |
| 6 | 9 | 166333.0 |
| 7 | 10 | 166899.0 |
| 8 | 11 | 167139.0 |
| 9 | 12 | 167333.0 |
| 10 | 13 | 167452.0 |
| 11 | 14 | 167522.0 |
| 12 | 15 | 167591.0 |
| 13 | 16 | 167605.0 |
| 14 | 17 | 167606.0 |
| 15 | 18 | 167606.0 |
| 16 | 19 | 167606.0 |
| 17 | 20 | 167606.0 |
| 18 | 21 | 167606.0 |
| 19 | 22 | 167606.0 |
| 20 | 23 | 167606.0 |
| 21 | 24 | 167606.0 |
| 22 | 25 | 167606.0 |
| 23 | 26 | 167606.0 |
| 24 | 27 | 167606.0 |
| 25 | 28 | 167606.0 |
def scatterplot_result(results):
# Plot the DataFrame, in scatter plot, taking P values as x and Coverage values as y
results.plot(kind="scatter", x="P", y="Coverage")
# Add grid lines
plt.grid(True)
# Add the current coverage point in color red
plt.scatter(len(stations), current_coverage, color="red")
# provide a dashed red line to inform current coverage
plt.axhline(y=current_coverage, color='r', linestyle='--', label='Current Coverage')
# show the plot!
plt.show()
scatterplot_result(results)
Task: Put your code to plot open_stations and coverage buffer from Question 6.¶
Feel free to edit any other plotting details
def map_result(p, demand_block=True):
open_stations = selecteds[p-3].copy()
open_stations['buffer'] = open_stations.geometry.buffer(S)
fig, ax = plt.subplots(figsize=(15, 10))
SBC_FD.plot(ax=ax, color='none', edgecolor='blue', zorder=10)
# blocks.plot(
# ax=ax,
# column='Population',
# cmap='viridis',
# legend=True,
# markersize=blocks['Population']*0.1,
# alpha=0.4,
# legend_kwds={'label':"Population"}
# )
open_stations.plot(ax=ax, color='green', markersize=50, label='Stations', zorder=5)
for buffer in open_stations['buffer']:
gpd.GeoSeries(buffer).boundary.plot(ax=ax, linestyle='--', color='black')
if demand_block:
blocks.plot("Population", ax=ax, legend=True, markersize=5)
else:
fishnet_points.plot(ax=ax)
plt.title(f"{p} open stations and coverage buffer")
plt.show()
map_result(10) # Try different p!
Task: Following function is to go through the whole process. Check if you get the same output as before :)¶
def optimize_and_evaluate(demand_block=True):
selecteds = []
obj_vals = []
for p in range(3, len(stations)+1):
print(f"=================== for P={p}")
selected_stations, obj_val = solve_mclp(p)
selecteds.append(selected_stations)
obj_vals.append(obj_val)
map_result(p, demand_block)
results = pd.DataFrame({
'P': range(3, len(stations)+1),
'Coverage': obj_vals
})
scatterplot_result(results)
optimize_and_evaluate()
=================== for P=3
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xc1148ef3
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [3e+00, 3e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 28463.000000
Root relaxation: objective 1.420460e+05, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 142046.00000 142046.000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 142046 28463 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.420460000000e+05, best bound 1.420460000000e+05, gap 0.0000%
=================== for P=4
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xd9224489
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [4e+00, 4e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.01s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 35944.000000
Root relaxation: objective 1.535990e+05, 20 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 153599.00000 153599.000 0.00% - 0s
Explored 1 nodes (20 simplex iterations) in 0.03 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 153599 35944 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.535990000000e+05, best bound 1.535990000000e+05, gap 0.0000%
=================== for P=5
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x1e8621a4
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [5e+00, 5e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 101213.00000
Root relaxation: objective 1.578710e+05, 19 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 157871.00000 157871.000 0.00% - 0s
Explored 1 nodes (19 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 157871 101213 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.578710000000e+05, best bound 1.578710000000e+05, gap 0.0000%
=================== for P=6
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x4872ed6f
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [6e+00, 6e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 103347.00000
Root relaxation: objective 1.615640e+05, 16 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 161564.00000 161564.000 0.00% - 0s
Explored 1 nodes (16 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 161564 103347 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.615640000000e+05, best bound 1.615640000000e+05, gap 0.0000%
=================== for P=7
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x50c869a2
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [7e+00, 7e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 138503.00000
Root relaxation: objective 1.636980e+05, 14 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 163698.00000 163698.000 0.00% - 0s
Explored 1 nodes (14 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 163698 138503 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.636980000000e+05, best bound 1.636980000000e+05, gap 0.0000%
=================== for P=8
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xc631c009
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [8e+00, 8e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 139069.00000
Root relaxation: objective 1.656950e+05, 11 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 165695.00000 165695.000 0.00% - 0s
Explored 1 nodes (11 simplex iterations) in 0.03 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 165695 139069 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.656950000000e+05, best bound 1.656950000000e+05, gap 0.0000%
=================== for P=9
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xde1bae41
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [9e+00, 9e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 139439.00000
Root relaxation: objective 1.663330e+05, 11 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 166333.00000 166333.000 0.00% - 0s
Explored 1 nodes (11 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 166333 139439 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.663330000000e+05, best bound 1.663330000000e+05, gap 0.0000%
=================== for P=10
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0xda05e924
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 139558.00000
Root relaxation: objective 1.668990e+05, 6 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 166899.00000 166899.000 0.00% - 0s
Explored 1 nodes (6 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 166899 139558 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.668990000000e+05, best bound 1.668990000000e+05, gap 0.0000%
=================== for P=11
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x4f3e9f77
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 140196.00000
Root relaxation: objective 1.671390e+05, 6 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167139.00000 167139.000 0.00% - 0s
Explored 1 nodes (6 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167139 140196 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.671390000000e+05, best bound 1.671390000000e+05, gap 0.0000%
=================== for P=12
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x1e3b83ba
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 140425.00000
Root relaxation: objective 1.673330e+05, 3 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167333.00000 167333.000 0.00% - 0s
Explored 1 nodes (3 simplex iterations) in 0.03 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167333 140425 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.673330000000e+05, best bound 1.673330000000e+05, gap 0.0000%
=================== for P=13
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x209b8da2
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 167360.00000
Root relaxation: objective 1.674520e+05, 2 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167452.00000 167452.000 0.00% - 0s
Explored 1 nodes (2 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167452 167360 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.674520000000e+05, best bound 1.674520000000e+05, gap 0.0000%
=================== for P=14
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x03cf73b5
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 167374.00000
Root relaxation: objective 1.675220e+05, 2 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167522.00000 167522.000 0.00% - 0s
Explored 1 nodes (2 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167522 167374 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.675220000000e+05, best bound 1.675220000000e+05, gap 0.0000%
=================== for P=15
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros
Model fingerprint: 0x952e5b76
Variable types: 0 continuous, 3252 integer (3252 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 3e+03]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3201 rows and 3209 columns
Presolve time: 0.00s
Presolved: 24 rows, 43 columns, 100 nonzeros
Variable types: 0 continuous, 43 integer (43 binary)
Found heuristic solution: objective 167443.00000
Root relaxation: objective 1.675910e+05, 1 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 167591.00000 167591.000 0.00% - 0s
Explored 1 nodes (1 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 167591 167443 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.675910000000e+05, best bound 1.675910000000e+05, gap 0.0000%
=================== for P=16 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0xcd3e3dcd Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3201 rows and 3209 columns Presolve time: 0.00s Presolved: 24 rows, 43 columns, 100 nonzeros Variable types: 0 continuous, 43 integer (43 binary) Found heuristic solution: objective 167605.00000 Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 167605 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676050000000e+05, best bound 1.676050000000e+05, gap 0.0000%
=================== for P=17 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x0e5accf5 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3203 rows and 3211 columns Presolve time: 0.00s Presolved: 22 rows, 41 columns, 90 nonzeros Found heuristic solution: objective 167606.00000 Variable types: 0 continuous, 41 integer (41 binary) Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=18 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0xbd53d068 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3210 rows and 3218 columns Presolve time: 0.00s Presolved: 15 rows, 34 columns, 62 nonzeros Found heuristic solution: objective 167606.00000 Variable types: 0 continuous, 34 integer (34 binary) Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=19 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x4d9615ea Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=20 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x06e3d55a Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.03 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=21 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0xac9379a7 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=22 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x294b1219 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=23 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x9b75ffee Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=24 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x4030e886 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.01s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=25 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0x80c372e9 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=26 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0xba252813 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.02 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=27 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0xb06b9a49 Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
=================== for P=28 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3225 rows, 3252 columns and 13191 nonzeros Model fingerprint: 0xe144439c Variable types: 0 continuous, 3252 integer (3252 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 3e+03] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3225 rows and 3252 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 167606 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.676060000000e+05, best bound 1.676060000000e+05, gap 0.0000%
Step 4. Replicate your Analysis with different Demand Representations¶
Task: Review from Lab 2. We are creating fishnet points within the SBC_FD¶
boundary = SBC_FD.envelope # .envelope gives you the bounding rectangle of given GeoDataFrame.
boundary.bounds
| minx | miny | maxx | maxy | |
|---|---|---|---|---|
| 0 | -61331.613 | -401270.1778 | 50847.5684 | -323367.7559 |
minx, miny, maxx, maxy = boundary.loc[0].bounds
print(minx, miny, maxx, maxy)
-61331.61300000176 -401270.1777999997 50847.56839999929 -323367.7559000002
from shapely.geometry import Point
# Here, we are going to create fishnet points.
# Fishnet points are points spaced with an equal interval.
# You'll see when you see the output!
# Define the interval between points
#### Note: Adjust interval value as needed for lab question 2
def create_fishnet(interval):
# Create arrays of x and y coordinates using np.arange
x_coords = np.arange(minx, maxx, interval)
y_coords = np.arange(miny, maxy, interval)
# Create a list to store the points
fishnet_points = []
# Generate points for the fishnet
for y in y_coords:
for x in x_coords:
fishnet_points.append((x, y))
# Print the number of points generated
print("Number of points in the fishnet:", len(fishnet_points))
fishnet_points = gpd.GeoSeries([Point(pt_cd) for pt_cd in fishnet_points])
fishnet_points = fishnet_points[fishnet_points.within(SBC_FD.geometry[0])]
fishnet_points.plot(figsize=(15,5))
return fishnet_points
interval = 5280/5 # default: 5280/5 feet (1 mile / 5 = 0.2 mile)
fishnet_points = create_fishnet(interval)
Number of points in the fishnet: 7918
# Current Coverage
current_coverage = fishnet_points.within(stations.buffer(S).unary_union).sum()
current_coverage
1795
Question 9: Re-compute the model variables here for fishnet_points, instead of blocks. ( 1 pt )¶
Note: all the fishnet points will have the same weight, 1.
fishnet_points = fishnet_points.reset_index(drop=True)
I = len(fishnet_points)
J = len(stations)
a_i = [1 for i in range(I)]
D_ij = [[np.sqrt((fishnet_points.x[i] - stations.geometry.x[j])**2 + (fishnet_points.y[i] - stations.geometry.y[j])**2)
for j in range(J)] for i in range(I)]
N_i = dict(zip(range(I), [[] for _ in range(I)]))
for i in range(I):
for j in range(J):
if D_ij[i][j] <= S:
N_i[i].append(j)
optimize_and_evaluate(demand_block=False)
=================== for P=3
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x3f7c710c
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [3e+00, 3e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.01s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 506.0000000
Root relaxation: objective 5.400000e+02, 45 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 540.0000000 540.00000 0.00% - 0s
Explored 1 nodes (45 simplex iterations) in 0.02 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 540 506 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 5.400000000000e+02, best bound 5.400000000000e+02, gap 0.0000%
=================== for P=4
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xa01cdfc9
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [4e+00, 4e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 582.0000000
Root relaxation: objective 7.040000e+02, 46 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 704.0000000 704.00000 0.00% - 0s
Explored 1 nodes (46 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 704 582 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 7.040000000000e+02, best bound 7.040000000000e+02, gap 0.0000%
=================== for P=5
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xb95f9119
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [5e+00, 5e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 675.0000000
Root relaxation: objective 8.550000e+02, 43 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 855.0000000 855.00000 0.00% - 0s
Explored 1 nodes (43 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 855 675 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 8.550000000000e+02, best bound 8.550000000000e+02, gap 0.0000%
=================== for P=6
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xdc018ef8
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [6e+00, 6e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 746.0000000
Root relaxation: objective 1.005000e+03, 39 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1005.0000000 1005.00000 0.00% - 0s
Explored 1 nodes (39 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1005 746 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.005000000000e+03, best bound 1.005000000000e+03, gap 0.0000%
=================== for P=7
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xd4eb132b
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [7e+00, 7e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 929.0000000
Root relaxation: objective 1.146000e+03, 38 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1146.0000000 1146.00000 0.00% - 0s
Explored 1 nodes (38 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1146 929 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.146000000000e+03, best bound 1.146000000000e+03, gap 0.0000%
=================== for P=8
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x05e3c257
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [8e+00, 8e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1086.0000000
Root relaxation: objective 1.270000e+03, 30 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1270.0000000 1270.00000 0.00% - 0s
Explored 1 nodes (30 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1270 1086 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.270000000000e+03, best bound 1.270000000000e+03, gap 0.0000%
=================== for P=9
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xf7ea4d1e
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [9e+00, 9e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.01s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1177.0000000
Root relaxation: objective 1.384000e+03, 30 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1384.0000000 1384.00000 0.00% - 0s
Explored 1 nodes (30 simplex iterations) in 0.05 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1384 1177 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.384000000000e+03, best bound 1.384000000000e+03, gap 0.0000%
=================== for P=10
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x7467d208
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1291.0000000
Root relaxation: objective 1.475000e+03, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1475.0000000 1475.00000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1475 1291 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.475000000000e+03, best bound 1.475000000000e+03, gap 0.0000%
=================== for P=11
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x10c3d27f
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1433.0000000
Root relaxation: objective 1.564000e+03, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1564.0000000 1564.00000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1564 1433 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.564000000000e+03, best bound 1.564000000000e+03, gap 0.0000%
=================== for P=12
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x649633df
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1493.0000000
Root relaxation: objective 1.647000e+03, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1647.0000000 1647.00000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1647 1493 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.647000000000e+03, best bound 1.647000000000e+03, gap 0.0000%
=================== for P=13
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x9b95d984
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1591.0000000
Root relaxation: objective 1.715000e+03, 18 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1715.0000000 1715.00000 0.00% - 0s
Explored 1 nodes (18 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1715 1591 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.715000000000e+03, best bound 1.715000000000e+03, gap 0.0000%
=================== for P=14
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xdadf5112
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1611.0000000
Root relaxation: objective 1.743000e+03, 17 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1743.0000000 1743.00000 0.00% - 0s
Explored 1 nodes (17 simplex iterations) in 0.03 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1743 1611 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.743000000000e+03, best bound 1.743000000000e+03, gap 0.0000%
=================== for P=15
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xe090a64f
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1646.0000000
Root relaxation: objective 1.763000e+03, 14 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1763.0000000 1763.00000 0.00% - 0s
Explored 1 nodes (14 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1763 1646 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.763000000000e+03, best bound 1.763000000000e+03, gap 0.0000%
=================== for P=16
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xc848a4a7
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1714.0000000
Root relaxation: objective 1.780000e+03, 8 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1780.0000000 1780.00000 0.00% - 0s
Explored 1 nodes (8 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1780 1714 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.780000000000e+03, best bound 1.780000000000e+03, gap 0.0000%
=================== for P=17
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x743280a7
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1789.0000000
Root relaxation: cutoff, 3 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 cutoff 0 1789.00000 1789.00000 0.00% - 0s
Explored 1 nodes (3 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 2: 1789 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.789000000000e+03, best bound 1.789000000000e+03, gap 0.0000%
=================== for P=18
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xbb43ee56
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1793.0000000
Root relaxation: infeasible, 1 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 infeasible 0 1793.00000 1793.00000 0.00% - 0s
Explored 1 nodes (1 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 2: 1793 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.793000000000e+03, best bound 1.793000000000e+03, gap 0.0000%
=================== for P=19 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xa9cc7751 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3260 rows and 3263 columns Presolve time: 0.00s Presolved: 45 rows, 69 columns, 199 nonzeros Variable types: 0 continuous, 69 integer (69 binary) Found heuristic solution: objective 1797.0000000 Explored 0 nodes (0 simplex iterations) in 0.03 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=20 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0x3c5cc094 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3261 rows and 3264 columns Presolve time: 0.00s Presolved: 44 rows, 68 columns, 192 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 68 integer (68 binary) Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=21 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xa72ab122 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3264 rows and 3267 columns Presolve time: 0.00s Presolved: 41 rows, 65 columns, 174 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 65 integer (65 binary) Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=22 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xf698ea55 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3272 rows and 3275 columns Presolve time: 0.00s Presolved: 33 rows, 57 columns, 134 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 57 integer (57 binary) Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=23 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xf679243a Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3285 rows and 3288 columns Presolve time: 0.00s Presolved: 20 rows, 44 columns, 82 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 44 integer (44 binary) Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=24 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0x63944ca0 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=25 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0x32ab1ba6 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=26 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xaedb8953 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=27 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xa6b75529 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=28 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xe7946d32 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
Task: Repeat the whole process with another fishnet_points with different fishnet interval.¶
interval = 10560/5 # default: 5280/5 feet (1 mile / 5 = 0.2 mile)
fishnet_points = create_fishnet(interval)
Number of points in the fishnet: 1998
optimize_and_evaluate(demand_block=False)
=================== for P=3
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x3f7c710c
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [3e+00, 3e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.03s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 506.0000000
Root relaxation: objective 5.400000e+02, 45 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 540.0000000 540.00000 0.00% - 0s
Explored 1 nodes (45 simplex iterations) in 0.05 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 540 506 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 5.400000000000e+02, best bound 5.400000000000e+02, gap 0.0000%
=================== for P=4
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xa01cdfc9
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [4e+00, 4e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 582.0000000
Root relaxation: objective 7.040000e+02, 46 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 704.0000000 704.00000 0.00% - 0s
Explored 1 nodes (46 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 704 582 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 7.040000000000e+02, best bound 7.040000000000e+02, gap 0.0000%
=================== for P=5
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xb95f9119
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [5e+00, 5e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 675.0000000
Root relaxation: objective 8.550000e+02, 43 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 855.0000000 855.00000 0.00% - 0s
Explored 1 nodes (43 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 855 675 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 8.550000000000e+02, best bound 8.550000000000e+02, gap 0.0000%
=================== for P=6
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xdc018ef8
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [6e+00, 6e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 746.0000000
Root relaxation: objective 1.005000e+03, 39 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1005.0000000 1005.00000 0.00% - 0s
Explored 1 nodes (39 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1005 746 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.005000000000e+03, best bound 1.005000000000e+03, gap 0.0000%
=================== for P=7
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xd4eb132b
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [7e+00, 7e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 929.0000000
Root relaxation: objective 1.146000e+03, 38 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1146.0000000 1146.00000 0.00% - 0s
Explored 1 nodes (38 simplex iterations) in 0.02 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1146 929 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.146000000000e+03, best bound 1.146000000000e+03, gap 0.0000%
=================== for P=8
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x05e3c257
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [8e+00, 8e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1086.0000000
Root relaxation: objective 1.270000e+03, 30 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1270.0000000 1270.00000 0.00% - 0s
Explored 1 nodes (30 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1270 1086 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.270000000000e+03, best bound 1.270000000000e+03, gap 0.0000%
=================== for P=9
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xf7ea4d1e
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [9e+00, 9e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1177.0000000
Root relaxation: objective 1.384000e+03, 30 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1384.0000000 1384.00000 0.00% - 0s
Explored 1 nodes (30 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1384 1177 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.384000000000e+03, best bound 1.384000000000e+03, gap 0.0000%
=================== for P=10
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x7467d208
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1291.0000000
Root relaxation: objective 1.475000e+03, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1475.0000000 1475.00000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.03 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1475 1291 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.475000000000e+03, best bound 1.475000000000e+03, gap 0.0000%
=================== for P=11
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x10c3d27f
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1433.0000000
Root relaxation: objective 1.564000e+03, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1564.0000000 1564.00000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1564 1433 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.564000000000e+03, best bound 1.564000000000e+03, gap 0.0000%
=================== for P=12
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x649633df
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1493.0000000
Root relaxation: objective 1.647000e+03, 27 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1647.0000000 1647.00000 0.00% - 0s
Explored 1 nodes (27 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1647 1493 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.647000000000e+03, best bound 1.647000000000e+03, gap 0.0000%
=================== for P=13
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x9b95d984
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1591.0000000
Root relaxation: objective 1.715000e+03, 18 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1715.0000000 1715.00000 0.00% - 0s
Explored 1 nodes (18 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1715 1591 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.715000000000e+03, best bound 1.715000000000e+03, gap 0.0000%
=================== for P=14
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xdadf5112
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+01, 1e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1611.0000000
Root relaxation: objective 1.743000e+03, 17 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1743.0000000 1743.00000 0.00% - 0s
Explored 1 nodes (17 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1743 1611 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.743000000000e+03, best bound 1.743000000000e+03, gap 0.0000%
=================== for P=15
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xe090a64f
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.01s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1646.0000000
Root relaxation: objective 1.763000e+03, 14 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1763.0000000 1763.00000 0.00% - 0s
Explored 1 nodes (14 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1763 1646 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.763000000000e+03, best bound 1.763000000000e+03, gap 0.0000%
=================== for P=16
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xc848a4a7
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1714.0000000
Root relaxation: objective 1.780000e+03, 8 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
* 0 0 0 1780.0000000 1780.00000 0.00% - 0s
Explored 1 nodes (8 simplex iterations) in 0.04 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 3: 1780 1714 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.780000000000e+03, best bound 1.780000000000e+03, gap 0.0000%
=================== for P=17
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0x743280a7
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1789.0000000
Root relaxation: cutoff, 3 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 cutoff 0 1789.00000 1789.00000 0.00% - 0s
Explored 1 nodes (3 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 2: 1789 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.789000000000e+03, best bound 1.789000000000e+03, gap 0.0000%
=================== for P=18
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52)
CPU model: Apple M1
Thread count: 8 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros
Model fingerprint: 0xbb43ee56
Variable types: 0 continuous, 3332 integer (3332 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [2e+01, 2e+01]
Found heuristic solution: objective -0.0000000
Presolve removed 3260 rows and 3263 columns
Presolve time: 0.00s
Presolved: 45 rows, 69 columns, 199 nonzeros
Variable types: 0 continuous, 69 integer (69 binary)
Found heuristic solution: objective 1793.0000000
Root relaxation: infeasible, 1 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 infeasible 0 1793.00000 1793.00000 0.00% - 0s
Explored 1 nodes (1 simplex iterations) in 0.01 seconds (0.00 work units)
Thread count was 8 (of 8 available processors)
Solution count 2: 1793 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.793000000000e+03, best bound 1.793000000000e+03, gap 0.0000%
=================== for P=19 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xa9cc7751 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3260 rows and 3263 columns Presolve time: 0.00s Presolved: 45 rows, 69 columns, 199 nonzeros Variable types: 0 continuous, 69 integer (69 binary) Found heuristic solution: objective 1797.0000000 Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=20 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0x3c5cc094 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3261 rows and 3264 columns Presolve time: 0.00s Presolved: 44 rows, 68 columns, 192 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 68 integer (68 binary) Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=21 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xa72ab122 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3264 rows and 3267 columns Presolve time: 0.00s Presolved: 41 rows, 65 columns, 174 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 65 integer (65 binary) Explored 0 nodes (0 simplex iterations) in 0.03 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=22 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xf698ea55 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3272 rows and 3275 columns Presolve time: 0.00s Presolved: 33 rows, 57 columns, 134 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 57 integer (57 binary) Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=23 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xf679243a Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3285 rows and 3288 columns Presolve time: 0.00s Presolved: 20 rows, 44 columns, 82 nonzeros Found heuristic solution: objective 1797.0000000 Variable types: 0 continuous, 44 integer (44 binary) Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 8 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=24 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0x63944ca0 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=25 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0x32ab1ba6 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [2e+01, 2e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=26 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xaedb8953 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.01 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=27 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xa6b75529 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
=================== for P=28 Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[arm] - Darwin 21.2.0 21C52) CPU model: Apple M1 Thread count: 8 physical cores, 8 logical processors, using up to 8 threads Optimize a model with 3305 rows, 3332 columns and 6943 nonzeros Model fingerprint: 0xe7946d32 Variable types: 0 continuous, 3332 integer (3332 binary) Coefficient statistics: Matrix range [1e+00, 1e+00] Objective range [1e+00, 1e+00] Bounds range [1e+00, 1e+00] RHS range [3e+01, 3e+01] Found heuristic solution: objective -0.0000000 Presolve removed 3305 rows and 3332 columns Presolve time: 0.00s Presolve: All rows and columns removed Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units) Thread count was 1 (of 8 available processors) Solution count 2: 1797 -0 Optimal solution found (tolerance 1.00e-04) Best objective 1.797000000000e+03, best bound 1.797000000000e+03, gap 0.0000%
Question 10: Compare the Scatter plots out of Blocks, 0.2 mile fishnet points, and another fishnet points with interval of your choice. Discuss the insights you can get. ( 5 pts )¶
In Lab 2, we discovered that different Coverage Distance Standard can impact the coverage analysis result.
In Lab 4, we can discover how different demand representation makes difference.
Share your insights about
- provide three scatter plots ( 3 pts )
- how SBC_FD is currently doing with existing stations in terms of coverage ( 1 pt )
- how demand representation impacts the coverage analysis ( 1 pt )
TIP: you can copy and paste your screenshot into markdown cells
- Here are three scatter plots:
- scatter plots out of blocks
2. 0.2 mile fishnet points
3. 0.4 mile fishnet points
Through observing the plots, the coverage circles indicate that some areas are well covered, but there are some gaps in coverage where no station covers certain blocks or fishnet points. This highlights areas that may need additional stations to ensure better coverage. Specifically, it suggests that even while the stations are now positioned effectively in many places, there are still some areas that need to gain from improved positioning or more stations.
Comparing between 0.2 mile and 0.4 mile fishnet points, we find that 0.2 mile fishnet points provide a denser demand representation than 0.4 mile fishnet points, showing more detailed coverage distances. In this regard, I think a lower interval like 0.2 mile in demand representation can help us make more precise decisions in optimizing the number and placement of stations needed.